<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    <meta content="Helen" name="generator">
    <title>table</title>
  </head>
  <body>
    <p>
       <font size="+2"><u>Machine Instructions</u></font>
    </p>
    <p>
       These are all the instructions currently supported by JSimpleSim. Instructions have a fixed
      length of two bytes. The first 4 bits of the 1st byte contain the opcode which specifies
      which of the 16 instructions to perform. The remaining 12 bits specify the operands to the
      instructions.
    </p>
    <p>
       &nbsp;
    </p>
    <table border="1" width="609">
      <tr>
        <td bgcolor="SILVER" align="center" valign="top" width="125">
          <p align="center">
             <font color="#000000"><b>Opcode/Operands</b></font>
          </p>
        </td>
        <td bgcolor="SILVER" align="center" valign="top" width="118">
          <p align="center">
             <font color="#000000"><b>Instruction</b></font>
          </p>
        </td>
        <td bgcolor="SILVER" align="center" valign="top" width="358">
          <p align="center">
             <font color="#000000"><b>Operation</b></font>
          </p>
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#0000ff">1</font> <font color="#ff0000">R</font><font color=
          "#008000">XY</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">load</font> &nbsp;&nbsp;&nbsp;<font color=
          "#ff0000">R</font>,&nbsp;[<font color="#008000">XY</font>]
        </td>
        <td valign="top" width="358">
          loads register[<font color="#ff0000">R</font>] with the value located at memory[<font
          color="#008000">XY</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">2</font> <font color="#ff0000">R</font><font color=
          "#008000">XY</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">load</font> &nbsp;&nbsp;&nbsp;<font color=
          "#ff0000">R</font>,&nbsp;<font color="#008000">XY</font> 
        </td>
        <td valign="top" width="358">
          <font color="#000000">loads</font> register[<font color="#ff0000">R</font>] with the
          immediate hexadecimal value <font color="#008000">XY</font><br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">D</font> 0<font color="#ff0000">RS</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">load</font> &nbsp;&nbsp;&nbsp;<font color="#ff0000">R, [S]</font> 
        </td>
        <td valign="top" width="358">
          loads register[<font color="#ff0000">R</font>] with the contents of a memory cell whose
          address is stored in register[<font color="#ff0000">S</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">3</font> <font color="#ff0000">R</font><font color=
          "#008000">XY</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">store</font> &nbsp;&nbsp;<font color=
          "#ff0000">R</font>,&nbsp;[<font color="#008000">XY</font>]
        </td>
        <td valign="top" width="358">
          stores the contents of register[<font color="#ff0000">R</font>] into memory[<font color=
          "#008000">XY</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">E</font> 0<font color="#ff0000">RS</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">store</font> &nbsp;&nbsp;<font color="#ff0000">R</font>, [<font
          color="#ff0000">S</font>]
        </td>
        <td valign="top" width="358">
          stores the contents of register[<font color="#ff0000">R</font>] into a memory cell whose
          location is specified by register[<font color="#ff0000">S</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">4</font> 0<font color="#ff0000">RS</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">move</font> &nbsp;<font color="#ff0000">S</font>, <font color=
          "#ff0000">R</font> 
        </td>
        <td valign="top" width="358">
          copy the contents of register[<font color="#ff0000">R</font>] into register[<font color=
          "#ff0000">S</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">5</font> <font color="#ff0000">RST</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">addi</font> &nbsp;&nbsp;&nbsp;<font color="#ff0000">R, S, T</font> 
        </td>
        <td valign="top" width="358">
          integer addition, adds the contents of register[<font color="#ff0000">S</font>] and
          register[<font color="#ff0000">T</font>] and stores the result in register[<font color=
          "#ff0000">R</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">6</font> <font color="#ff0000">RST</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">addf</font> &nbsp;&nbsp;<font color="#ff0000">R, S, T</font> 
        </td>
        <td valign="top" width="358">
          float addition, adds the contents of register[<font color="#ff0000">S</font>] and
          register[<font color="#ff0000">T</font>] and stores the result in register[<font color=
          "#ff0000">R</font>]
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">7</font> <font color="#ff0000">RST</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">or</font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff0000">R, S,
          T</font> 
        </td>
        <td valign="top" width="358">
          bitwise OR: OR the contents of register[<font color="#ff0000">S</font>] and
          register[<font color="#ff0000">T</font>] and stores the result in register[<font color=
          "#ff0000">R</font>]
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">8</font> <font color="#ff0000">RST</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">and</font> &nbsp;&nbsp;&nbsp;<font color="#ff0000">R, S, T</font> 
        </td>
        <td valign="top" width="358">
          bitwise AND: AND the contents of register[<font color="#ff0000">S</font>] and
          register[<font color="#ff0000">T</font>] and stores the result in register[<font color=
          "#ff0000">R</font>]
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">9</font> <font color="#ff0000">RST</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">xor</font> &nbsp;&nbsp;&nbsp;<font color="#ff0000">R, S, T</font> 
        </td>
        <td valign="top" width="358">
          bitwise XOR: XOR the contents of register[<font color="#ff0000">S</font>] and
          register[<font color="#ff0000">T</font>] and stores the result in register[<font color=
          "#ff0000">R</font>]
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">A</font> <font color="#ff0000">R</font>0<font color=
          "#008000">X</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">ror</font> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#ff0000">R</font>,
          <font color="#008000">X</font> 
        </td>
        <td valign="top" width="358">
          rotate right the bits in register[<font color="#ff0000">R</font>], <font color=
          "#008000">X</font> number of times and store the result in register[<font color=
          "#ff0000">R</font>]
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">B</font> <font color="#ff0000">R</font><font color=
          "#008000">XY</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">jmpEQ</font> <font color="#ff0000">R</font>=<font color=
          "#ff0000">R0</font>,&nbsp;<font color="#008000">XY</font> 
        </td>
        <td valign="top" width="358">
          jump to memory location <font color="#008000">XY</font>, if register[<font color=
          "#ff0000">R</font>] is equivalent to register[<font color="#ff0000">0</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">B</font> 0<font color="#008000">XY</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">jmp</font> &nbsp;&nbsp;&nbsp;&nbsp;<font color="#008000">XY</font> 
        </td>
        <td valign="top" width="373">
          jump to memory location <font color="#008000">XY</font> 
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">F</font> <font color="#ff0000">R</font><font color=
          "#008000">XY</font> 
        </td>
        <td valign="top" width="118">
          <font color="#000080">jmpLE</font> <font color="#ff0000">R</font>&lt;=<font color=
          "#ff0000">R0</font>, <font color="#008000">XY</font> 
        </td>
        <td valign="top" width="373">
          jump to memory location <font color="#008000">XY</font>, if the contents
          of&nbsp;register[<font color="#ff0000">R</font>] are less than the contents
          of&nbsp;register[<font color="#ff0000">0</font>]<br>
           
        </td>
      </tr>
      <tr>
        <td valign="top">
          <font color="#000080">C</font> 000
        </td>
        <td valign="top" width="118">
          <font color="#000080">halt</font> 
        </td>
        <td valign="top" width="373">
          Stop execution, halt the program<br>
           
        </td>
      </tr>
    </table>
    <p>
       &nbsp;
    </p>
  </body>
</html>
